package cn.tx;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author Administrator
 * @title: MyHttpServlet
 * @projectName tx-servlet1
 * @description: TODO
 * @date 2019/4/1020:47
 */
public class MyHttpServlet extends HttpServlet{
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("doGet 方法被调用了!!!");
//        super.doGet(req, resp);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("doPost 方法被调用了!!!");
//        super.doPost(req, resp);
    }

    @Override
    public void init(ServletConfig config) throws ServletException {
        System.out.println("MyHttpServlet 被初始化了!!!");
        super.init(config);
    }
}
